//-----------------------------------------------------------------------
// <copyright file="SlotFrameType.cs" company="tuliprules.org">
//     Copyright (c) 2011 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the SlotFrameType class.</summary>
//-----------------------------------------------------------------------
namespace Tulip.Rules.Models.Rif.Core
{
    using System;
    using System.ComponentModel;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents the slot-Frame type. 
    /// </summary>
    [Serializable]
    [DesignerCategory(@"code")]
    [XmlType(TypeName = "slot-Frame.type", Namespace = "http://www.w3.org/2007/rif#")]
    public class SlotFrameType : IRifCoreElement
    {
        /// <summary>
        /// The first item field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private object item1Field;

        /// <summary>
        /// The second item field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private object item2Field;

        /// <summary>
        /// The ordered field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string orderedField;

        /// <summary>
        /// Initializes a new instance of the SlotFrameType class.
        /// </summary>
        public SlotFrameType()
        {
            this.orderedField = "yes";
        }

        /// <summary>
        /// Gets or sets a conjunction.
        /// </summary>
        [XmlElement("Const", typeof(Const), Order = 0)]
        [XmlElement("Var", typeof(Var), Order = 0)]
        [XmlElement("External", typeof(ExternalTermType), Order = 0)]
        [XmlElement("List", typeof(List), Order = 0)]
        public object Item1
        {
            get
            {
                return this.item1Field;
            }

            set
            {
                this.item1Field = value;
            }
        }

        /// <summary>
        /// Gets or sets a conjunction.
        /// </summary>
        [XmlElement("Const", typeof(Const), Order = 1)]
        [XmlElement("Var", typeof(Var), Order = 1)]
        [XmlElement("External", typeof(ExternalTermType), Order = 1)]
        [XmlElement("List", typeof(List), Order = 1)]
        public object Item2
        {
            get
            {
                return this.item2Field;
            }

            set
            {
                this.item2Field = value;
            }
        }

        /// <summary>
        /// Gets or sets a flag that indicates if the list of items roles is ordered.
        /// </summary>
        [XmlAttribute("ordered")]
        public string Ordered
        {
            get
            {
                return this.orderedField;
            }

            set
            {
                this.orderedField = value;
            }
        }
    }
}
